#pragma once
#include <time.h>



class stopWatch//No init is needed
{
private:
	time_t lastStep;
	time_t currStep;
	float updateInterval;	//In Milliseconds
public:
	stopWatch()
	{
		lastStep		= clock();
		currStep		= clock();
	};
	void init(float interval)	//How fast it updates
	{
		updateInterval	= interval;
	}

	bool update()
	{
		currStep = clock();
		if(currStep - lastStep > updateInterval)
		{
			lastStep = currStep;
			return true;
		}
		return false;
	}

};

